<script setup>
import { Divider, Cell, CellGroup,Image,NavBar,NoticeBar,Swipe, SwipeItem } from 'vant';
import {getOssPrefix} from "@/v-api/properties";
import request from "@/utils/request";
import {ref} from "vue";
const image = getOssPrefix()+'image/ded28204c9bc471e9eeb50ee99fb3972校徽.jpg'
const images = [
  getOssPrefix()+'image/c6f710a52ce845748da256a712a86300new2.png',
  getOssPrefix()+'image/e757d7a944b44b0a8508f6f326603da1new3.png',
  getOssPrefix()+'image/dc867ae59c6348ad8e45d233715dca42new4.png'
];
const items = ref([]);

request.post('school/1')
    .then(response => {
      items.value = response.data;
      console.log(items.value);
    })
    .catch(error => {
      console.error(error);
    });
</script>

<template>
  <div class="bg">
    <NavBar style="height: 50px">
    <template #title>
      <Image
          width="170"
          height="55"
          :src="image"
      />
    </template>
    </NavBar>
    <NoticeBar scrollable left-icon="volume-o"
               text="华南农业大学2024年高考招生总计划9160人，较去年增加80个招生计划。其中广东省招生计划7028人，其他省（区、市）招生计划合计1950人，其他类型招生计划182人。" />
    <swipe class="my-swipe" :autoplay="3000" lazy-render>
      <swipe-item class="my-swipe-item" v-for="image in images" :key="image">
        <img  :src="image" />
      </swipe-item>
    </swipe>
<!--  <NoticeBar scrollable left-icon="volume-o"-->
<!--             text="近日，华南农业大学公布2024年本科招生计划。今年，华农新增1个招生专业、2个招生方向，还设置了N个招生特色班！"/>-->
<!--    <NoticeBar scrollable left-icon="volume-o"-->
<!--               text="我校学子在广东省本科高校植物生产类专业大赛上斩获佳绩！"/>-->
    <NoticeBar
      wrapable
      :scrollable="false"
      color="#1989fa" background="#ecf9ff"
      style="font-size: 16px;line-height: 1.5;letter-spacing: 1px;"
      :text="items.profile"
  />
  </div>
</template>

<style scoped>
.bg{
  width: 100%;
  height: 100%;
  background-color: white;
}

.my-swipe-item {
  height: 150px;
}

.my-swipe-item img{
  width: 100%;
  height: 100%;
}
</style>